//
//  SystemMessageTableViewCell.m
//  firstpoint
//
//  Created by 泽中 on 2017/7/18.
//  Copyright © 2017年 xzcysoft. All rights reserved.
//

#import "SystemMessageTableViewCell.h"

@implementation SystemMessageTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        _timeLab=[[UILabel alloc]initWithFrame:CGRectMake(width_screen-200, 11, 180, 13)];
        _timeLab.textColor=[UIColor lightGrayColor];
        _timeLab.text=@"10月9日";
        _timeLab.font=[UIFont systemFontOfSize:12];
        _timeLab.textAlignment=2;
        [self.contentView addSubview:_timeLab];
        _imgView=[[UIImageView alloc]initWithFrame:CGRectMake(5, 10, 40, 40)];
        [self.contentView addSubview:_imgView];
        
        _titleLab=[[UILabel alloc]initWithFrame:CGRectMake(55, 11, 150, 15)];
        _titleLab.font=[UIFont systemFontOfSize:13];
        [self.contentView addSubview:_titleLab];
        
        _infoLab=[[UILabel alloc]initWithFrame:CGRectMake(55, 30 , width_screen-100, 15)];
        _infoLab.font=_titleLab.font;
        _infoLab.textColor=[UIColor lightGrayColor];
        [self.contentView addSubview:_infoLab];
    }
    return self;
}
#pragma mark - 绘制Cell分割线
- (void)drawRect:(CGRect)rect {
    
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor);
    CGContextFillRect(context, rect);
    
    
    //下分割线
    CGContextSetStrokeColorWithColor(context, [UIColor colorWithRed:198/255.0 green:198/255.0 blue:198/255.0 alpha:1].CGColor);
    CGContextStrokeRect(context, CGRectMake(0, rect.size.height, rect.size.width, 0));
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
